{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "fe105ef6-5264-4cb4-b467-60d9b0a337fd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ping\n"
     ]
    }
   ],
   "source": [
    "%capture ${TEST_DIR}/pingpong.txt\n",
    "%%\n",
    "fmt.Println(\"Ping\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "ee9acf4f-2488-4f92-bfae-6998d8351175",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ping\n"
     ]
    }
   ],
   "source": [
    "!cat ${TEST_DIR}/pingpong.txt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "004e9622-e3a4-4780-816a-e5d1c77055b4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Pong\n"
     ]
    }
   ],
   "source": [
    "%capture -a ${TEST_DIR}/pingpong.txt\n",
    "%%\n",
    "fmt.Println(\"Pong\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "aee500e4-5728-4224-9746-f61d58909851",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ping\n",
      "Pong\n"
     ]
    }
   ],
   "source": [
    "!cat ${TEST_DIR}/pingpong.txt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "c8214b58-5946-4db5-a329-9e2f2c2fc215",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "Ping\n",
       "Pong\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%capture ${TEST_DIR}/pingpong.txt\n",
    "import \"github.com/janpfeifer/gonb/gonbui\"\n",
    "%%\n",
    "gonbui.DisplayHTML(\"Ping\\nPong\\n\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "f67d51c5-dbcb-4e96-aba5-380bc55dbf53",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ping\n",
      "Pong\n"
     ]
    }
   ],
   "source": [
    "!cat ${TEST_DIR}/pingpong.txt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "9b88a712-deae-4d48-80a1-c4795db31c22",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/markdown": [
       "# Ping\n",
       "# Pong\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%capture ${TEST_DIR}/pingpong.txt\n",
    "import \"github.com/janpfeifer/gonb/gonbui\"\n",
    "%%\n",
    "gonbui.DisplayMarkdown(\"# Ping\\n# Pong\\n\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "e884811a-e7c9-425b-aa0b-394b1628ccd8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "# Ping\n",
      "# Pong\n"
     ]
    }
   ],
   "source": [
    "!cat ${TEST_DIR}/pingpong.txt"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Go (gonb)",
   "language": "go",
   "name": "gonb"
  },
  "language_info": {
   "codemirror_mode": "",
   "file_extension": ".go",
   "mimetype": "text/x-go",
   "name": "go",
   "nbconvert_exporter": "",
   "pygments_lexer": "",
   "version": "go1.25.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
